<!--
 * Created by PhpStorm.
 * 版权所有: 2019~2022 [ hhygyl ]
 * Date: 2019/7/4-11:09
 * Link: http://luckyadmin.luckyhhy.cn
 * FileName: my_info.html
 *-->

{include file="public/head" /}

<body>

<div class="layui-fluid">
    <div class="layui-row layui-col-space15">
        <div class="layui-col-md12">
            <div class="layui-card">
                <div class="layui-card-header">设置我的资料</div>
                <div class="layui-card-body" >

                    <div class="layui-form" lay-filter="">

                        <div class="layui-form-item">
                            <label class="layui-form-label">所属角色：</label>
                            <div class="layui-input-inline">

                                {:widget('forms/singleSelect',array('role_id|1|所属角色|title_show|id',$tree,$info.role_id))}

                            </div>
                            <div class="layui-form-mid layui-word-aux">管理员所属的角色</div>
                            <input type="hidden" name="id"  value="{$info.id}">
                        </div>


                        <div class="layui-form-item">
                            <label class="layui-form-label">头像：</label>
                            {:widget('forms/uploadImg',array('avatar',$info['avatar'],'90x90','头像','300x300'))}
                        </div>


                        <div class="layui-form-item">
                            <label class="layui-form-label">用户名：</label>
                            <div class="layui-input-inline">
                                <input type="text" name="username" lay-verify="required" value="{$info.username}"  class="layui-input">
                            </div>
                            <div class="layui-form-mid layui-word-aux">一般用于后台登入名</div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">昵称：</label>
                            <div class="layui-input-inline">
                                <input type="text" name="nickname" value="{$info.nickname}" lay-verify="required" autocomplete="off" placeholder="请输入昵称" class="layui-input">
                            </div>
                            <div class="layui-form-mid layui-word-aux">管理员昵称用于后台显示</div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">性别：</label>
                            <div class="layui-input-block">
                                <input type="radio" name="sex" value="男" {eq name="$info.sex" value="男" }  checked {/eq} title="男">
                                <input type="radio" name="sex" value="女" {eq name="$info.sex" value="女" }  checked {/eq} title="女" >
                            </div>
                        </div>


                      <!--  <div class="layui-form-item">
                            <label class="layui-form-label">上传图集：</label>
                            <div class="layui-input-block">
                                {:widget('forms/uploadMultImg',array('images','','图集','100x100',20))}
                            </div>
                        </div>-->


                        {:token()}

                        <div class="layui-form-item">
                            <label class="layui-form-label">手机号码：</label>
                            <div class="layui-input-inline">
                                <input type="text" name="phone" value="{$info.phone}" lay-verify="required|phone" autocomplete="off" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">邮箱：</label>
                            <div class="layui-input-inline">
                                <input type="text" name="email" value="{$info.email}"  autocomplete="off" class="layui-input">
                            </div>
                        </div>


                        <div class="layui-form-item layui-form-text">
                            <label class="layui-form-label">备注：</label>
                            <div class="layui-input-block">
                                <textarea name="beizhu" placeholder="请输入内容" class="layui-textarea">{$info.beizhu}</textarea>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <div class="layui-input-block">
                                <button class="layui-btn" lay-submit lay-filter="setmyinfo">确认修改</button>
                            </div>
                        </div>
                    </div>

                </div>
            </div>
        </div>
    </div>
</div>


<script src="{__ADMIN_PATH}js/base.js"></script>

<script >

    layui.use(['element','form', 'jquery', 'laydate','lucky'], function () {
        var element = layui.element;
        var form = layui.form;
        var $ = layui.jquery;
        var laydate = layui.laydate;
        var lucky=layui.lucky;

        form.render();

        /**
         * 表格提交
         */
        form.on('submit(setmyinfo)', function (data) {
            lucky.FormSubmit("{:url('setting/MyInfo')}",data.field);
            return false;
        });

    });

</script >

</body >
</html >